#include"add.h"

void plus_count(char show[rows][cols], char mine[rows][cols], int x, int y)
{
    int c = 0;
    c = count(mine, x, y);
    if (c == 0)
    {
        show[x][y] = ' ';
        int i = 0, j = 0;

        for (i = -1; i <= 1; i++)
        {
            for (j = -1; j <= 1; j++)
            {
                if ((x + i) > 0 && (y + i) > 0 && (x + i < rows) && (y + j < cols) && show[x + i][y + j] == '*')
                {
                    plus_count(show, mine, x + i, y + j);
                }
            }
        }
    }
    else
    {
        show[x][y] = c + '0';
    }
}

